package io.datajek.spring.basics.movierecommendersystem.lesson6;

import io.datajek.spring.basics.movierecommendersystem.lesson2.Filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class RecommenderImplementation {
 //过滤器是RecommenderImplementation的一个依赖
    //使用过滤器来获得推荐
  @Autowired
  @Qualifier("CBF")
        private Filter contentBasedFilter;

public String[] recommendMovies(String movie){
//打印正在使用的接口实现的name
    System.out.println("\nName of the filter in use"+contentBasedFilter+"\n");

    String[] results= contentBasedFilter.getRecommendations("Finding Dory");

    return results;
}
}
